package com.jsong.linuo.string;

import java.util.Scanner;

/**
 * @Author: 黎诺
 * @CreateTime: 2025-05-01
 * @Description: 练习 ->键盘录入一个字符串,判定字符串是否为"回文内容"
 */

public class StringBuilder02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串:");
        String data = sc.next();

        StringBuilder sb = new StringBuilder(data);
        sb.reverse();
        String s = sb.toString();

        if (data.equals(s)){
            System.out.println("是回文内容");
        }else{
            System.out.println("不是回文内容");
        }
    }
}
